package com.mccrea.pattern.handler;

/**
 * @Classname DepartmentHead
 * @Description 系主任
 * @Date 2021/5/24 0024 16:31
 * @Created by Mccrea_Gao
 */
public class DepartmentHead extends Leader {
    @Override
    void handleRequest(int leaveDays) {
        if (leaveDays <= 7) {
            System.out.println("系主任批准" + leaveDays + "天假！");
        } else {
            if (getNext() != null) {
                getNext().handleRequest(leaveDays);
            } else {
                System.out.println("未批准" + leaveDays + "天假！");
            }
        }
    }
}
